#!/bin/bash

RESULT_OUTPUT_ROOT="/remote/iosg/strat-1/buckets/analysis.derived.coin/live/plot/et_detect"
cd "${REPO_ROOT}"

if [ -n "${1}" ]; then
  TRADING_DATE="${1}"
else
  TRADING_DATE="$(TZ=Asia/Shanghai date '+%Y%m%d')"
fi

echo "TRADING_DATE=${TRADING_DATE}"

source /remote/iosg/home/bot-hft/miniconda3/etc/profile.d/conda.sh
conda activate /remote/iosg/home/bot-hft/miniconda3/envs/coin2_motion_env

./pyrunner cc/appcoin2/support/feed/et_detect.py \
  --trading_date=${TRADING_DATE} \
  --sim_result_dir=${RESULT_OUTPUT_ROOT} \
  --slurm_cpu=30

conda deactivate
